feat: add network tab to node page with peer connectivity visualization #2826
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a Network tab to the individual node page, displaying connectivity data that helps users understand network topology and relationships between nodes.
Changes Made
New Network Tab
UI Components
NodeNetworkcomponent that follows the same pattern as the database network tabNodeNetworkcomponent from the database diagnostics for consistent visualizationTab Configuration
NODE_TABS_IDSandNODE_TABSconfigurationrenderTabContentswitch in Node.tsxInternationalization
Technical Implementation
The implementation leverages the existing network API (
networkApi.useGetNetworkInfoQuery) and filters the results to focus on the current node and its peers. The network tab uses the same visual components and interaction patterns as the database network tab, providing a consistent user experience.The network information is fetched only when a tenant name is available, and the component gracefully handles cases where no network data or peers are found.
Visual Impact
The network tab provides users with:
This enhancement improves the monitoring and debugging experience for YDB cluster administrators by making network relationships more visible and accessible at the individual node level.
Fixes #2428.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Greptile Summary
Updated On: 2025-09-15 16:31:54 UTC
This PR adds a new "Network" tab to individual node pages in the YDB Embedded UI, providing network connectivity visualization at the node level. The implementation follows the established architectural patterns by adding the network tab configuration to
NODE_TABS_IDSandNODE_TABSarrays, and integrating it into the main Node component's tab rendering system.The changes are minimal and focused, consisting of two key modifications: extending the node page configuration in
NodePages.tsto include the network tab with proper internationalization support, and updating the mainNode.tsxcomponent to handle the new network tab case by importing and rendering theNodeNetworkcomponent. The network tab reuses existing network API endpoints and visualization components from the database-level network diagnostics, but filters the data to show only the current node and its direct peers.The implementation integrates seamlessly with the existing tab navigation system used for Storage, Tablets, Structure, and Threads tabs. The network tab receives both
nodeIdandtenantNameprops to enable proper data fetching and context-aware filtering. This enhancement provides administrators with node-specific network topology visualization, complementing the existing database-level network monitoring capabilities and improving the debugging experience for connectivity issues.Important Files Changed
Changed Files
Confidence score: 4/5
Sequence Diagram
sequenceDiagram participant User participant NodePage as Node.tsx participant NodeNetwork as NodeNetwork.tsx participant NetworkAPI as networkApi participant Redux as Redux Store participant Components as UI Components User->>NodePage: "Navigate to node page with network tab" NodePage->>NodePage: "Parse activeTabId from URL" NodePage->>NodePage: "Filter available tabs based on node capabilities" alt Network tab selected NodePage->>NodeNetwork: "Render NodeNetwork component" NodeNetwork->>Redux: "Get auto refresh interval" NodeNetwork->>Redux: "Get problem filter state" NodeNetwork->>NetworkAPI: "useGetNetworkInfoQuery(tenantName)" NetworkAPI-->>NodeNetwork: "Return network data or loading state" alt Data loading NodeNetwork->>Components: "Show loader" Components-->>User: "Display loading spinner" else Data loaded successfully NodeNetwork->>NodeNetwork: "Find current node and peers" NodeNetwork->>NodeNetwork: "Group nodes by type and rack" NodeNetwork->>Components: "Render controls (filters, checkboxes)" NodeNetwork->>Components: "Render current node section" NodeNetwork->>Components: "Render network peers section" Components-->>User: "Display network visualization" else No network data NodeNetwork->>Components: "Show placeholder with network icon" Components-->>User: "Display 'No network peers found' message" else Error occurred NodeNetwork->>Components: "Show ResponseError" Components-->>User: "Display error message" end end User->>NodeNetwork: "Toggle problem filter" NodeNetwork->>Redux: "Dispatch changeFilter action" Redux-->>NodeNetwork: "Update filter state" NodeNetwork->>Components: "Re-render filtered nodes" Components-->>User: "Update display based on filter" User->>NodeNetwork: "Toggle show ID checkbox" NodeNetwork->>NodeNetwork: "Update showId state" NodeNetwork->>Components: "Re-render nodes with/without IDs" Components-->>User: "Toggle node ID visibility" User->>NodeNetwork: "Toggle show racks checkbox" NodeNetwork->>NodeNetwork: "Update showRacks state" NodeNetwork->>Components: "Re-render nodes with rack grouping" Components-->>User: "Toggle rack visualization" User->>Components: "Hover over node" Components->>Redux: "Dispatch showTooltip action" Redux-->>User: "Display node tooltip" User->>Components: "Mouse leave node" Components->>Redux: "Dispatch hideTooltip action" Redux-->>User: "Hide tooltip"